-
Notifications
You must be signed in to change notification settings - Fork 267
AZD VS Code Extension Updates & Improvements #6425
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
- Add new Extensions view with tree data provider for managing azd extensions - Implement extension commands: install, uninstall, and upgrade - Add ExtensionProvider service for interacting with azd extension APIs - Add environment variables tree node for displaying env vars in workspace - Enhance environment tree views with toggle visibility and .env file viewing - Add inline actions to environment view (view .env, select environment) - Add navigation buttons to view titles (new environment, install extension) - Improve tree view type checking with isTreeViewModel utility - Update telemetry IDs for new extension and environment operations - Refactor command handlers to support both workspace and environment tree views
…g Posts - Rename 'Resources' link to 'AZD Blog Posts' in Help and Feedback view - Update URL to point to Azure SDK blog filtered by azure-developer-cli tag - Update command title to 'Open AZD Blog Posts'
- Added new command to open Azure resources directly in the Azure Portal - Created OpenInPortalStep wizard step to handle portal URL opening - Enhanced RevealStep with improved resource tree navigation and error handling - Added debug logging throughout wizard steps for better diagnostics - Improved error handling in PickResourceStep and PickResourceGroupStep - Updated command registration and package.json with new command - Added localized command title in package.nls.json - Modified reveal.ts to support both TreeViewModel and direct service item inputs - Enhanced RevealStep to activate required Azure extensions and refresh tree before reveal - Added fallback mechanisms when automatic reveal fails (copy ID, open in portal options)
…ents view - Extended environment commands to support both workspace and standalone views - Added refresh functionality to Environments view after environment operations - Connected env-refresh, env-edit, env-delete, and revealResourceGroup commands to standalone environments - Updated reveal.ts to handle EnvironmentTreeItem for resource group navigation - Modified env.ts to accept EnvironmentTreeItem in all environment operations - Added view refresh commands after env operations (delete, new, select, refresh) - Removed automatic env-select on click for non-default environments - Fixed ESLint warnings with naming-convention for Azure provider types - Added comment explaining focusGroup limitation in RevealStep - Improved regex patterns in RevealStep for better linting compliance This unifies the experience across both the workspace environments and the standalone environments view, ensuring users can perform the same operations from either location.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This WIP PR introduces significant improvements to the Azure Developer CLI VS Code extension, adding a new dedicated activity bar view with multiple panels for managing environments, extensions, and resources. The changes focus on providing a standalone interface for environment management and adding convenient navigation features to Azure Portal.
Key Changes:
- Adds a new activity bar container with four views: My Project, Environments, Extensions, and Help and Feedback
- Implements environment variable visibility toggle functionality with hidden-by-default behavior
- Adds "Show in Azure Portal" command for quick navigation from services
- Extends reveal commands to work with both workspace and standalone environment views
Reviewed changes
Copilot reviewed 35 out of 38 changed files in this pull request and generated 20 comments.
Show a summary per file
| File | Description |
|---|---|
package-lock.json |
Empty lock file added at repository root (should be removed) |
ext/vscode/ext/vscode/package-lock.json |
Empty lock file in duplicate nested path (should be removed) |
ext/vscode/package-lock.json |
Lock file dependency updates (peer dependencies unmarked) |
.vscode/settings.json |
Added aspire settings (unrelated to PR scope) |
ext/vscode/package.json |
Registered new views container, views, commands, and menus for enhanced UI |
ext/vscode/package.nls.json |
Added localization for new "Show in Azure Portal" command |
ext/vscode/src/extension.ts |
Integrated new view registration in activation |
ext/vscode/src/views/registerViews.ts |
New file registering all tree data providers and view commands |
ext/vscode/src/views/myProject/MyProjectTreeDataProvider.ts |
New provider for My Project view without environments |
ext/vscode/src/views/environments/EnvironmentsTreeDataProvider.ts |
New standalone environments view with variable visibility toggle |
ext/vscode/src/views/extensions/ExtensionsTreeDataProvider.ts |
New extensions management view |
ext/vscode/src/views/helpAndFeedback/HelpAndFeedbackTreeDataProvider.ts |
New help and feedback view with links |
ext/vscode/src/views/workspace/AzureDevCliApplication.ts |
Added environment variables provider and optional environment inclusion |
ext/vscode/src/views/workspace/AzureDevCliEnvironment.ts |
Enhanced with collapsible environment variables child node |
ext/vscode/src/views/workspace/AzureDevCliEnvironments.ts |
Added env values provider integration |
ext/vscode/src/views/workspace/AzureDevCliEnvironmentVariables.ts |
New classes for environment variable tree items with visibility toggle |
ext/vscode/src/views/workspace/AzureDevCliWorkspaceResourceBranchDataProvider.ts |
Added visibility state management |
ext/vscode/src/services/AzureDevEnvValuesProvider.ts |
New service to fetch environment variable values via CLI |
ext/vscode/src/services/AzureDevExtensionProvider.ts |
New service to list installed azd extensions |
ext/vscode/src/commands/registerCommands.ts |
Registered new extension management and portal navigation commands |
ext/vscode/src/commands/extensions.ts |
New command implementations for extension install/uninstall/upgrade |
ext/vscode/src/commands/env.ts |
Extended environment commands to support standalone view items |
ext/vscode/src/commands/azureWorkspace/reveal.ts |
Extended reveal commands with EnvironmentTreeItem support and portal navigation |
ext/vscode/src/commands/azureWorkspace/wizard/OpenInPortalStep.ts |
New wizard step for opening resources in Azure Portal |
ext/vscode/src/commands/azureWorkspace/wizard/RevealStep.ts |
Enhanced with extension activation, retry logic, and better error handling |
ext/vscode/src/commands/azureWorkspace/wizard/PickEnvironmentStep.ts |
Added debug logging |
ext/vscode/src/commands/azureWorkspace/wizard/PickResourceStep.ts |
Added error handling and debug logging |
ext/vscode/src/commands/azureWorkspace/wizard/PickResourceGroupStep.ts |
Added error handling and improved error messages |
ext/vscode/src/commands/up.ts |
Added support for AzureDevCliModel type guard |
ext/vscode/src/commands/down.ts |
Added support for AzureDevCliModel type guard |
ext/vscode/src/commands/deploy.ts |
Added support for AzureDevCliModel type guard |
ext/vscode/src/commands/provision.ts |
Added support for AzureDevCliModel type guard |
ext/vscode/src/commands/restore.ts |
Added support for AzureDevCliModel type guard |
ext/vscode/src/commands/packageCli.ts |
Added support for AzureDevCliModel type guard |
ext/vscode/src/commands/pipeline.ts |
Added support for AzureDevCliModel type guard |
ext/vscode/src/commands/monitor.ts |
Added support for AzureDevCliModel type guard |
ext/vscode/src/utils/isTreeViewModel.ts |
Added isAzureDevCliModel type guard function |
ext/vscode/src/telemetry/telemetryId.ts |
Added telemetry IDs for extension management commands |
Files not reviewed (2)
- ext/vscode/ext/vscode/package-lock.json: Language not supported
- ext/vscode/package-lock.json: Language not supported
ext/vscode/src/commands/azureWorkspace/wizard/PickResourceStep.ts
Outdated
Show resolved
Hide resolved
ext/vscode/src/views/environments/EnvironmentsTreeDataProvider.ts
Outdated
Show resolved
Hide resolved
ext/vscode/src/views/environments/EnvironmentsTreeDataProvider.ts
Outdated
Show resolved
Hide resolved
Added unit tests for: - OpenInPortalStep: Tests portal URL construction for various Azure resource types * Web Apps, Storage Accounts, Cosmos DB, Container Apps, Resource Groups * Error handling for missing resource IDs * Priority configuration - RevealStep: Tests Azure resource reveal functionality * Extension activation for different Azure providers * Resource group pre-expansion logic * Multi-attempt reveal with fallback * Error handling and user notifications * Tree refresh mechanisms - EnvironmentsTreeDataProvider: Tests standalone environments view * Environment listing and hierarchy * Default environment marking * Environment variable visibility toggling * Tree refresh events * Integration with environment providers - ExtensionsTreeDataProvider: Tests extensions management view * Extension listing and display * Version information * Tree item creation * Refresh functionality All tests use proper mocking with sinon, follow established patterns, and provide comprehensive coverage of success and error paths.
- Add sinon and @types/sinon for test mocking - Remove unused telemetryId parameter from registerActivityCommand - Add documentation for telemetry tracking in commands - Fix isAzdCommand to handle undefined input - Add TEST_COVERAGE.md documentation
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Implements comprehensive language support for azure.yaml configuration files: - Auto-completion for host types, lifecycle hooks, and properties with snippets - Hover documentation with examples and Microsoft Learn links - Quick fixes for missing folders, properties, and invalid configurations - Add new service refactoring with interactive wizard - Enhanced validation diagnostics Includes 28 new test cases (all passing) covering completion, hover, code actions, and diagnostics. Updated README.md, FEATURE_IDEAS.md, and cspell dictionary.
Implements comprehensive language support for azure.yaml configuration files: - Auto-completion for host types, lifecycle hooks, and properties with snippets - Hover documentation with examples and Microsoft Learn links - Quick fixes for missing folders, properties, and invalid configurations - Add new service refactoring with interactive wizard - Enhanced validation diagnostics Includes 28 new test cases (all passing) covering completion, hover, code actions, and diagnostics. Updated README.md, FEATURE_IDEAS.md, and cspell dictionary.
… and initialization Add a new Template Tools view panel that helps users discover and initialize Azure Developer CLI templates: Features: - Dynamic Quick Start section (visible only when no azure.yaml exists) - Initialize from existing code - Create minimal project - Browse template gallery - Browse templates by 6 predefined categories (AI/ML, Web Apps, APIs, Containers, Databases, Starters) - AI Templates section with direct access to aka.ms/aiapps templates - Search functionality with QuickPick UI for filtering templates - Template items with inline actions: - Click template name to view README - Hover actions: Initialize (rocket icon), View on GitHub (github icon) - Context menu with all actions Implementation: - AzureDevTemplateProvider service for fetching/caching templates from awesome-azd JSON feed (1-hour cache) - TemplateToolsTreeDataProvider with FileSystemWatcher for azure.yaml changes - Template comm Add a new Template Tools view panel that helps users discover and initialize Azure Developer CLI temp) - Features: - Dynamic Quick Start section (visible only when no azure.yaml exists) - Initialize ft test coverage (11 n - Initialize from existing code - Create minined between Environmen - Create minimal projecs and seamlessly integrates with exi- Browse temit workflows.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 61 out of 64 changed files in this pull request and generated 2 comments.
Files not reviewed (1)
- ext/vscode/package-lock.json: Language not supported
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.
|
@bwateratmsft ping |
bwateratmsft
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've been on vacation, but I'll review this week. Doing "request changes" for now so it doesn't accidentally get merged ahead of that.
bwateratmsft
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@copilot There is throughout the PR a general pattern of editing files just to add overly-verbose logging, and all of it via console.log which is not correct.
Where the logs are valuable to the user, it should instead be changed to ext.outputChannel.
Otherwise, where the substance of the file hasn't changed--and just overly-verbose logging is added--please revert the files to their original state. We can add things back in a separate PR if we desire.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@copilot This file is unnecessary and should be removed
ext/vscode/src/commands/azureWorkspace/wizard/OpenInPortalStep.ts
Outdated
Show resolved
Hide resolved
Fixes Azure#5691 Implements friendly azure.yaml/azure.yml validation within the extension to catch errors before they cause unfriendly error dialog pop-ups. Changes: - Enhanced diagnostic provider with comprehensive validation - Improved error handling in AzureDevShowProvider - Added 17 new test cases (all passing) - Updated README.md and TESTING_GUIDE.md with validation features - All lint, tests, and cspell checks passing Key features: - Empty file detection with helpful guidance - YAML parsing errors with user-friendly messages - Missing required properties validation - Invalid service properties detection - Directs users to Problems panel instead of showing pop-ups
- Remove all console.log/console.error statements, replace with ext.outputChannel.appendLog where appropriate - Add category to new commands in package.json - Remove redundant CI test step from copilot-instructions.md - Delete unnecessary TEST_COVERAGE.md file - Delete duplicate ext/vscode/package-lock.json - Update README.md Getting Started with extension install command option - Update minimum AZD version requirement to 1.8.0
|
@bwateratmsft addressed most if not all feedback. Thanks for the review! |
bwateratmsft
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
None of the playwright tests that were added provide any real value. They should just be removed, along with the playwright dev dependency.
ext/vscode/src/test/suite/unit/environmentsTreeDataProvider.test.ts
Outdated
Show resolved
Hide resolved
- Remove Playwright e2e testing infrastructure - Update extension icon - Add copyright header requirement to Copilot instructions - Convert unit tests from assert to Chai assertions - Merge azureYamlValidation.test.ts into azureYamlDiagnostics.test.ts - Update .vscodeignore and .gitignore
|
Thanks @bwateratmsft, made the needed changes. Good call on the playwright feedback (trying to be too fancy)
|
|
I see the latest build is failing, I'm guessing it's referring to not wanting the extension icon to be an SVG. The activity bar icon definitely can be an SVG. |
…icons: resources/icon.svg
yea, fixed that. |
VSCode Extension Installation Instructions
|
Introduces significant improvements to the Azure Developer CLI VS Code extension, focusing on enhanced environment management, improved resource navigation, and better user experience.
📋 Summary of Changes
🆕 New Features
1. Standalone Environments View
2. Extensions Management View
3. "Show in Azure Portal" Command
4. Enhanced Environment Operations
env-refresh,env-edit,env-delete,revealAzureResourceGroup🔧 Improvements
Resource Navigation
revealAzureResourceGroupto support standalone environmentsUser Experience
Code Quality
EnvironmentTreeItemsupport📊 Commits Included
bec9154f- Remove Environments from My Project view89d29243- Add extensions view and enhanced environment managementab57695c- Update Help and Feedback link from Resources to AZD Blog Posts15197c3d- Add 'Show in Azure Portal' command for servicesa9f3d191- Integrate environment commands with standalone Environments view🧪 Testing Checklist
🔍 Related Issues
<- Improved regex patterns in RevealStep for better linting compliance Link any related issues here -->
📝 Notes
This is a work in progress. Additional testing and refinement may be needed before final review.